package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * 07-thymeleaf解析url
 * 携带请求参数
 */
@WebServlet("/demo05")
public class Demo05Servlet extends ViewBaseServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("Demo05Servlet");
        String msg = request.getParameter("msg");
        System.out.println("msg = " + msg);
        String msg2 = request.getParameter("msg2");
        System.out.println("msg2 = " + msg2);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }
}
